import Vue from 'vue'
import VueRouter from 'vue-router'
import LayoutView from "@/views/LayoutView.vue";
import MenuView from "@/views/MenuView.vue";
import TagView from "@/views/tag/TagView.vue";
import CategoryView from "@/views/tag/CategoryView.vue";
import PayView from "@/views/pay/PayView.vue";
import NovelList from "@/views/book/NovelList.vue";
import ChapterList from "@/views/book/ChapterList.vue";
import CommentList from "@/views/book/CommentList.vue";
import UserList from "@/views/mave/UserList.vue";
import Banner from "@/views/pay/Banner.vue";

Vue.use(VueRouter)

export default new VueRouter({
  routes: [
    {
      path: '/',
      component: LayoutView,
      redirect: '/dashboard',
      children: [
          //其他页面列表
        {
          path: 'dashboard',
          component: MenuView,
          name: 'Dashboard',
          meta: { title: '首页' }
        },
        {
          path: 'tag',
          component: TagView,
          name: 'Tag',
          meta: { title: '标签列表' }
        },
        {
          path: 'category',
          component: CategoryView,
          name: 'Category',
          meta: { title: '分类列表' }
        },
        {
          path: 'pay',
          component: PayView,
          name: 'pay',
          meta:{ title: '支付列表'}
        },
        {
          path: 'novel/list',
          component: NovelList,
          name: 'novelList',
          meta:{ title: '小说列表'}
        },
          {
            path: 'novel/chapter',
            component: ChapterList,
            name: 'novelchapter',
            meta:{ title: '章节列表'}
          },
          {
            path: 'novel/comment',
            component: CommentList,
            name: 'novelcomment',
            meta:{ title: '评论列表'}
          },
        {
          path: 'user/list',
          component: UserList,
          name: 'userlist',
          meta:{ title: '用户列表'}
        },
        {
          path: 'banner',
          component: Banner,
          name: 'banner',
          meta:{ title: '广告列表'}
        },
      ]
    }
  ]
})
